home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-jena.de!news
- From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
- Newsgroups: comp.lang.c++
- Subject: DEC Compiler error
- Date: 31 Jan 1996 15:15:05 GMT
- Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
- Message-ID: <4eo11p$qlr@fsuj01.rz.uni-jena.de>
- Reply-To: mkt@isun04.inf.uni-jena.de
- NNTP-Posting-Host: isun07.inf.uni-jena.de
-
- In older DEC C++ Compilers (cxx for all Alpha systems) there is
- a strange error. (I think the latest version is clean.)
-
- class X {
- struct Y {}; // nested class
- Y f(); // function returning object of nested class
- };
-
- X::Y X::f() { // member function definition
- // DEC cxx: X::Y is not accessable
- return Y();
- }
-
- The error message 'X::Y is not accessable' is simply an error by the
- DEC Compiler.
- Here is the proof:
-
- class X {
- struct Y {};
- Y f() { return Y(); }
- };
-
- This code compiles without error message! But where is the difference?
-
- But, as stated before, the latest version of the compiler seem to run correct.
-
-
-